VERSION 5.00
Begin VB.UserControl RoundRectBox 
   BackColor       =   &H00FFFFFF&
   ClientHeight    =   4065
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   6225
   ClipBehavior    =   0  'None
   DrawMode        =   9  'Not Mask Pen
   DrawStyle       =   6  'Inside Solid
   FontTransparent =   0   'False
   HasDC           =   0   'False
   MaskColor       =   &H00000000&
   ScaleHeight     =   271
   ScaleMode       =   3  'Pixel
   ScaleWidth      =   415
End
Attribute VB_Name = "RoundRectBox"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
   Dim bHeight As Integer
   Dim bWidth As Integer
   
   Dim hPen As Long  ' handle to the pen to use to draw the shape
   Dim hBrush As Long  ' handle to the brush to use to draw the shape
   Dim hOldPen As Long  ' handle to Form1's previous pen
   Dim hOldBrush As Long  ' handle to Form1's previous brush
   Dim retval As Long  ' return value

Private Sub UserControl_Initialize()
   hBrush = CreateHatchBrush(7, RGB(255, 255, 192))
End Sub

Private Sub UserControl_Paint()
   hPen = CreatePen(1, 2, RGB(0, 0, 0))
  ' hBrush = CreateHatchBrush(7, RGB(255, 255, 192))
   hOldPen = SelectObject(UserControl.hdc, hPen)
   hOldBrush = SelectObject(UserControl.hdc, hBrush)
   retval = RoundRect(UserControl.hdc, 1, 1, bWidth + 1, bHeight + 1, 30, 30)
   retval = SelectObject(UserControl.hdc, hOldPen)
   retval = SelectObject(UserControl.hdc, hOldBrush)
End Sub

Private Sub UserControl_Resize()
   bHeight = ScaleHeight - 1
   bWidth = ScaleWidth - 1
End Sub

Property Let BackColor(ByVal BackCol As ColorConstants)
   hBrush = CreateHatchBrush(7, BackCol)
   UserControl_Paint
End Property
